/**
 * @file    Expression classname is undefined on line 2, column 15 in Templates/Classes/Class.java.
 * @author  Haseeb Yousaf
 * @see     LICENSE (MIT style license file)
 * @version 1.0
 * @date    Nov 22, 2011 4:35:59 PM
 */
package carrello.model.association;

import carrello.model.entities.*;
import java.util.Date;
import java.util.Set;

public class AssociationFactory {
    public static Invoice createInvoice(int invoiceId, int quantity, String cost, String productname, Date purchase_date, char status,User user, PaymentProcessor processor)
    {
        return new Invoice(invoiceId, quantity, cost, productname,purchase_date, status, user, processor);
    }
    
    public static AttributeValue createAttributeValue(Attribute attribute, Product product, String value)
    {
        AttributeValuePK attValueKey = new AttributeValuePK();
        attValueKey.setAttribute(attribute);
        attValueKey.setProduct(product);
        return new AttributeValue(attValueKey, value);
    }
    
    public static ProductBelongsToCategory createProductBelongsToCategory(Category category, Set<Product> products)
    {
        return new ProductBelongsToCategory(category, products);
    }
    
    public static CategoryHasAttributes createCategoryHasAttributes(Set<Category> categories, Set<Attribute> attributes)
    {
        return new CategoryHasAttributes(categories, attributes);
    }
    
    public static CategoryHasAttributes createCategoryHasAttributes(Category category, Set<Attribute> attributes)
    {
        return new CategoryHasAttributes(category, attributes);
    }
    
    public static InvoiceProcessedByPaymentProcessor createInvoiceProcessedByPaymentProcessor(PaymentProcessor processor, Set<Invoice> invoices)
    {
        return new InvoiceProcessedByPaymentProcessor(processor, invoices);         
    }
    
    public static CategoryAssociation createCategoryAssociation(int sourceid, int destinationid, String association_name)
    {
        return new CategoryAssociation(sourceid, destinationid, association_name);
    }
    
}
